home *** CD-ROM | disk | FTP | other *** search
/ Gurewich OLE Controls for Visual Basic 4 / Gurewich OLE Controls for Visual Basic 4.iso / ocxprog / programs / ch04 / push3d.frm (.txt) next >
Encoding:
Visual Basic Form  |  1995-08-24  |  6.2 KB  |  205 lines

  1. VERSION 4.00
  2. Begin VB.Form frmPush3D 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "The Push3D Program"
  6.    ClientHeight    =   3525
  7.    ClientLeft      =   1095
  8.    ClientTop       =   1815
  9.    ClientWidth     =   4095
  10.    Height          =   4215
  11.    Icon            =   "PUSH3D.frx":0000
  12.    Left            =   1035
  13.    LinkTopic       =   "Form1"
  14.    MaxButton       =   0   'False
  15.    ScaleHeight     =   3525
  16.    ScaleWidth      =   4095
  17.    Top             =   1185
  18.    Width           =   4215
  19.    Begin VB.Timer Timer1 
  20.       Interval        =   250
  21.       Left            =   0
  22.       Top             =   840
  23.    End
  24.    Begin VB.CheckBox chkEnabled 
  25.       BackColor       =   &H00C0C0C0&
  26.       Caption         =   "&Enabled"
  27.       Height          =   255
  28.       Left            =   3000
  29.       TabIndex        =   3
  30.       Top             =   240
  31.       Value           =   1  'Checked
  32.       Width           =   975
  33.    End
  34.    Begin VB.CheckBox chkVisible 
  35.       BackColor       =   &H00C0C0C0&
  36.       Caption         =   "&Visible"
  37.       Height          =   255
  38.       Left            =   1800
  39.       TabIndex        =   2
  40.       Top             =   240
  41.       Value           =   1  'Checked
  42.       Width           =   855
  43.    End
  44.    Begin VB.CheckBox chkSpin 
  45.       BackColor       =   &H00C0C0C0&
  46.       Caption         =   "&Spin"
  47.       Height          =   255
  48.       Left            =   840
  49.       TabIndex        =   1
  50.       Top             =   240
  51.       Width           =   630
  52.    End
  53.    Begin VB.Label lblCounter 
  54.       Alignment       =   2  'Center
  55.       BackColor       =   &H00C0C0C0&
  56.       Caption         =   "0"
  57.       BeginProperty Font 
  58.          name            =   "MS Sans Serif"
  59.          charset         =   0
  60.          weight          =   400
  61.          size            =   29.25
  62.          underline       =   0   'False
  63.          italic          =   0   'False
  64.          strikethrough   =   0   'False
  65.       EndProperty
  66.       Height          =   705
  67.       Left            =   840
  68.       TabIndex        =   5
  69.       Top             =   2760
  70.       Width           =   2535
  71.    End
  72.    Begin Teg3dpLibCtl.Teg3dp pshClickMe 
  73.       Height          =   1695
  74.       Left            =   840
  75.       TabIndex        =   4
  76.       Top             =   840
  77.       Width           =   2535
  78.       _version        =   65536
  79.       _extentx        =   4471
  80.       _extenty        =   2990
  81.       _stockprops     =   78
  82.       caption         =   "&Click Me"
  83.       bevelwidth      =   10
  84.       squarecorners   =   -1  'True
  85.       pictureup       =   "PUSH3D.frx":030A
  86.       picturefocus    =   "PUSH3D.frx":1C14
  87.       picturedisabled =   "PUSH3D.frx":351E
  88.       picturedown     =   "PUSH3D.frx":4E28
  89.    End
  90.    Begin TegoswLibCtl.Tegosw swExit 
  91.       Height          =   630
  92.       Left            =   0
  93.       TabIndex        =   0
  94.       Top             =   0
  95.       Width           =   525
  96.       _version        =   65536
  97.       _extentx        =   926
  98.       _extenty        =   1111
  99.       _stockprops     =   64
  100.       value           =   -1  'True
  101.    End
  102.    Begin VB.Menu mnuFile 
  103.       Caption         =   "&File"
  104.       Begin VB.Menu mnuExit 
  105.          Caption         =   "E&xit"
  106.       End
  107.    End
  108.    Begin VB.Menu mnuHelp 
  109.       Caption         =   "&Help"
  110.       Begin VB.Menu mnuAbout 
  111.          Caption         =   "&About..."
  112.       End
  113.    End
  114. Attribute VB_Name = "frmPush3D"
  115. Attribute VB_Creatable = False
  116. Attribute VB_Exposed = False
  117. ' All variables must be declared.
  118. Option Explicit
  119. Private Sub chkEnabled_Click()
  120.   ' If the chkEnabled check box is checked,
  121.   ' enable the pshClickMe push button. Otherwise,
  122.   ' disable the pshClickMe push button.
  123.   If chkEnabled.Value = 1 Then
  124.      pshClickMe.Enabled = True
  125.   Else
  126.      pshClickMe.Enabled = False
  127.   End If
  128. End Sub
  129. Private Sub chkVisible_Click()
  130.   ' If the chkVisible check box is checked,
  131.   ' make the pshClickMe push button visible.
  132.   ' Otherwise, make the pshClickMe push button
  133.   ' invisible.
  134.   If chkVisible.Value = 1 Then
  135.      pshClickMe.Visible = True
  136.   Else
  137.      pshClickMe.Visible = False
  138.   End If
  139. End Sub
  140. Private Sub mnuAbout_Click()
  141.    Dim Title
  142.    Dim Msg
  143.    Dim CR
  144.    CR = Chr(13)
  145.    Title = "About the Push3D Program"
  146.    Msg = "This program was written with Visual "
  147.    Msg = Msg + "Basic for Windows, using the "
  148.    Msg = Msg + "TegoSoft 3D Pushbutton OCX control. "
  149.    Msg = Msg + CR + CR
  150.    Msg = Msg + "The TegoSoft 3D Pushbutton OCX control "
  151.    Msg = Msg + "is part of the TegoSoft OCX Control "
  152.    Msg = Msg + "Kit - a collection of various OCX controls. "
  153.    Msg = Msg + CR + CR
  154.    Msg = Msg + "For more information about the "
  155.    Msg = Msg + "TegoSoft OCX Control Kit, contact TegoSoft "
  156.    Msg = Msg + "at:"
  157.    Msg = Msg + CR + CR
  158.    Msg = Msg + "TegoSoft Inc." + CR
  159.    Msg = Msg + "P.O. Box 389" + CR
  160.    Msg = Msg + "Bellmore, NY 11710"
  161.    Msg = Msg + CR + CR
  162.    Msg = Msg + "Phone: (516)783-4824"
  163.    MsgBox Msg, vbInformation, Title
  164. End Sub
  165. Private Sub mnuExit_Click()
  166.    ' Terminate the program.
  167.    Unload Me
  168. End Sub
  169. Private Sub pshClickMe_Click()
  170.     Dim Counter
  171.     ' Increment the count in the lblCounter label.
  172.     Counter = Val(lblCounter.Caption) + 1
  173.     lblCounter.Caption = Str(Counter)
  174. End Sub
  175. Private Sub swExit_Click()
  176.    Dim Title
  177.    Dim Question
  178.    Dim Response
  179.    ' If the user turned the swExit switch OFF,
  180.    ' confirm that the user wants to exit the
  181.    ' program, and if so, exit the program.
  182.    If swExit.Value = False Then
  183.       Title = "Exit Program"
  184.       Question = "Are you sure you want to exit?"
  185.       Response = MsgBox(Question, vbYesNo + vbQuestion, Title)
  186.       If Response = vbYes Then
  187.          Unload Me
  188.       Else
  189.          swExit.Value = True
  190.       End If
  191.    End If
  192. End Sub
  193. Private Sub Timer1_Timer()
  194.    ' If the chkSpin check box is not checked,
  195.    ' terminate this procedure.
  196.    If (chkSpin.Value = 0) Then
  197.       Exit Sub
  198.    End If
  199.    ' If the pshClickMe push button is pressed down,
  200.    ' simulate a click of the pshClickMe button.
  201.    If pshClickMe.IsButtonDown = True Then
  202.       pshClickMe_Click
  203.    End If
  204. End Sub
  205.